{if $id == 0}
<script>javascript:alert('评论成功!');
window.opener.location.reload();
window.close();</script>
{/if}

<style type="text/css">
    <!--
    body, td, th {
        font-size: 12px;
    }

    -->
</style>

<div class="news-list c">
    <ul>

        <div class="content-form">
            <form name="form1" method="post" action="/comment/save">
                <table width="1120" height="400" border="1" align="center" cellpadding="3" cellspacing="1"
                       bordercolor="#67B41A" style="border-collapse:collapse">
                    <tr>
                        <td>客房名称：</td>
                        <td>
                            <input name='id' type='text' id='id' value='{$id}' hidden/>
                            <input type='text' id='name' value='{$name}' disabled/>
                        </td>
                    </tr>
                    <tr>
                        <td>评分：</td>
                        <td align="left">
                            <select name="score" id="score">
                                <option value="1">1</option>
                                <option value="2">2</option>
                                <option value="3">3</option>
                                <option value="4">4</option>
                                <option value="5">5</option>
                            </select></td>
                    </tr>
                    <tr>
                        <td>评论内容：</td>
                        <td align="left"><textarea name='content' cols='50' rows='8' id='content'></textarea>
                            &nbsp;*
                        </td>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td align="left">
                            <input type="submit" name="Submit" value="添加" onClick="return check();"/>
                            <input type="reset" name="Submit2" value="重置"/>
                        </td>
                    </tr>
                </table>
            </form>
            <script language="javascript">
                function check() {
                    if (document.form1.content.value == "") {
                        alert("请输入评论内容");
                        document.form1.name.focus();
                        return false;
                    }
                }
            </script>
        </div>
    </ul>
</div>

